Professional Documents
Culture Documents
http://www.w3schools.com/css/css_examples.asp
<style type="text/css">
ul
{
list-style-image: url('arrow.gif')
}
</style>
</head>
<body>
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Coca Cola</li>
</ul>
</body>
</html>
<style type="text/css">
ul.inside
{
list-style-position: inside
}
ul.outside
{
list-style-position: outside
}
</style>
</head>
<body>
<style type="text/css">
ul
{
list-style-type:square; list-style-position:inside; list-style-image:url('arrow.gif');
}
</style>
</head>
<body>
<p><b>Note:</b> Netscape 4 does not display the images or position the list.</p>
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Coca Cola</li>
</ul>
</body>
</html>
<body>
<p>
<span>T</span>his is some text.
This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
</p>
<p>
In the paragraph above, the first letter of the text is embedded in a span element.
The span element has a width that is 0.7 times the size of the current font.
The font-size of the span element is 400% (quite large) and the line-height is 80%.
The font of the letter in the span will be in "Algerian".
</p>
</body>
</html>
<html>
<head>
<style type="text/css">
ul
{
float:left;
width:100%;
padding:0;
margin:0;
list-style-type:none;
}
a
{
float:left;
width:6em;
text-decoration:none;
color:white;
background-color:purple;
padding:0.2em 0.6em;
border-right:1px solid white;
}
a:hover {background-color:#ff3300}
li {display:inline}
</style>
</head>
<body>
<ul>
<li><a href="#">Link one</a></li>
<li><a href="#">Link two</a></li>
<li><a href="#">Link three</a></li>
<li><a href="#">Link four</a></li>
</ul>
<p>
In the example above, we let the ul element and the a element float to the left.
The li elements will be displayed as inline elements (no line break before or after the
element). This forces the list to be on one line.
The ul element has a width of 100% and each hyperlink in the list has a width of 6em (6
times the size of the current font).
We add some colors and borders to make it more fancy.
</p>
</body>
</html>
<p>
<b>Note:</b> Netscape 4 does not support the "cursor" property.
</p>
<p>
Move the mouse over the words to see the cursor change.
</p>
<span style="cursor:auto">
Auto</span><br />
<span style="cursor:crosshair">
Crosshair</span><br />
<span style="cursor:default">
Default</span><br />
<span style="cursor:pointer">
Pointer</span><br />
<span style="cursor:move">
Move</span><br />
<span style="cursor:e-resize">
e-resize</span><br />
<span style="cursor:ne-resize">
ne-resize</span><br />
<span style="cursor:nw-resize">
nw-resize</span><br />
<span style="cursor:n-resize">
n-resize</span><br />
<span style="cursor:se-resize">
se-resize</span><br />
<span style="cursor:sw-resize">
sw-resize</span><br />
<span style="cursor:s-resize">
s-resize</span><br />
<span style="cursor:w-resize">
w-resize</span><br />
<span style="cursor:text">
text</span><br />
<span style="cursor:wait">
wait</span><br />
<span style="cursor:help">
help</span>
</body>
</html>
<html>
<head>
<style type="text/css">
img.x
{
position:absolute;
left:0px;
top:0px;
z-index:-1
}
</style>
</head>
<body>
<h1>This is a Heading</h1>
<img class="x" src="bulbon.gif" width="100" height="180">
An @media rule specifies the target media types (separated by commas) of a set of
rules (delimited by curly braces). The @media construct allows style sheet rules for
various media in the same style sheet:
@media print {
BODY { font-size: 10pt }
}
@media screen {
BODY { font-size: 12pt }
}
@media screen, print {
BODY { line-height: 1.2 }
}
.test
{
//font related stuffs
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000033;
font-style: italic;
line-height: normal;
font-weight: bold;
text-transform: none;
font-variant: small-caps;
text-decoration: underline;
background-color: #CCCCFF;
background-image: url(file:///D|
/Project/Diamdel/WebContent/images/banner_locationsbg.gif);
background-attachment: fixed;
background-repeat: no-repeat;
width: auto;
height: auto;
clear: both;
margin-top: 10px;
margin-right: 10px;
margin-bottom: 10px;
margin-left: 10px;
padding: 2;
padding-top: 2px;
padding-right: 2px;
padding-bottom: 2px;
padding-left: 2px;
llist-style-type: circle;
list-style-image: url(images/arrowdouble.gif);
list-style-position: inside; outside;
position: relative;
visibility: visible;
left: auto;
bottom: auto;
//Extensions
cursor: pointer;
}
Out of Scope:
Body {
scrollbar-3dlight-color: #999999;
scrollbar-arrow-color: #EDEDED;
scrollbar-face-color: #BAB8B9;
scrollbar-track-color: #D4D4D4;
font-family:times;
}
//Div scroll color style
.scrolldiv {
BORDER-RIGHT: #333333 2px solid;
BORDER-LEFT: #333333 2px solid;
scrollbar-3dlight-color: #999999;
scrollbar-arrow-color: #EDEDED;
scrollbar-face-color: #BAB8B9;
scrollbar-track-color: #D4D4D4;
}
//TextBox style
.TextBox
{
border:1px solid #7F9DB9;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
height: 17px;
}
//Button style
.BTN
{
background-color: #7DA7DF;
border-bottom:2px solid #666666;
border-right:2px solid #666666;
border-left:2px solid #cccccc;
border-top:2px solid #cccccc;
color:#FFFFFF;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:10px;
font-weight:bold;
}
BODY
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #000000;
}